The life cycle of every program begins as a source program (or source file). At its most fundamental level, your code is nothing more than a sequence of bits, organized into 8-bit chunks called bytes. To us, it is logic; to the computer, it is a digital manuscript of numeric codes.
1. The ASCII Standard
To ensure that the 'i' you type in int is the same 'i' the computer reads, we use the ASCII standard. Every character corresponds to a specific integer value. For example, the character # is stored as the byte value $35$, while i is $105$.
| Char | # | i | n | c | l | u | d | e |
|---|---|---|---|---|---|---|---|---|
| ASCII | 35 | 105 | 110 | 99 | 108 | 117 | 100 | 101 |
2. Text vs. Binary Files
The distinction between text files and binary files is purely based on context. Files consisting entirely of ASCII characters are text files; all others are binary. In this initial "source" phase, your program exists solely as a linear string of these numeric codes.